<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>
        //构造函数
        function Person(name, age) {
            this.name = name
            this.age = age
        }
        //原型对象
        Person.prototype.type = '哺乳动物'
        //实例对象
        let p1 = new Person('曾鹏', 20)
        // console.log(p1);
        //检测p1的原型
        console.log(p1.__proto__.constructor);
        console.log(p1.__proto__ == Person.prototype);
    </script>
</body>

</html>